<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_pre_evaluation_other_value`.
 */
class m171027_074849_create_project_pre_evaluation_other_value_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        //非抵押物价值评估
        $this->createTable('project_pre_evaluation_other_value', [
            'id' => $this->bigPrimaryKey(),
            'mortgage_id' => $this->bigInteger()->notNull(),
            'bought_analysis' => $this->text()->comment('+非抵押物的回收亮点分析'),
            'bought_reservation' => $this->text()->comment('非抵押部分回收（保守）'),
            'bought_radical' => $this->text()->comment('非抵押部分回收（乐观）'),
            'created_at' => $this->timestamp(),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_pre_evaluation_other_value');
    }
}
